# Maintainer: Robin Broda <coderobe @ archlinux.org>
# Contributor: Frederik Schwan <frederik dot schwan at linux dot com>

pkgname=duperemove
pkgver=0.11.3
pkgrel=2
pkgdesc='Btrfs extent deduplication utility'
arch=('loong64' 'x86_64')
url='https://github.com/markfasheh/duperemove'
license=('GPL')
depends=('glib2' 'sqlite')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('0669cbb8a08082b9c2b62aff26759951e3e2c1b2236676ac6d79b9639027f775e4e5a218d1c7930b33ad7cca39726764cce5ac3063dc7d2049eb65fc4431af89')

build() {
  cd "${pkgname}-${pkgver}"
  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make PREFIX=/usr SBINDIR=/usr/bin DESTDIR="${pkgdir}" install
}
